<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../../../taglib.jsp"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort()+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<easyui:list>
<html>
<head>
<base href="<%=basePath%>" />
<title></title>
<%@ include file="/webmodules/console/css.jsp"%>
<%@ include file="/webmodules/console/js.jsp"%>
<script type="text/javascript">
${js}
function stop(){
		var rows = $('#mydatagrid').datagrid('getSelections');
		if (rows.length > 0) {
			var ids = new Array();
			for ( var i = 0; i < rows.length; i++) {
				ids.push(rows[i].ID);
			}
			$.post("dragon/modules/system/org/action/OrgHandler/changeState.ejw", {
				ids : ids.join(","),
				state : 0
			}, function(data) {
				if (data == "t") {
					$('#mydatagrid').datagrid('reload');
					top.showMsg("", "停用成功！", false);
				} else {
					top.showErrorMsg("出错了", data);
				}
			});
			ids = null;
		} else {
			top.showMsg("", "请选择数据！", true);
		}
	}
function start(){
		var rows = $('#mydatagrid').datagrid('getSelections');
		if (rows.length > 0) {
			var ids = new Array();
			for ( var i = 0; i < rows.length; i++) {
				ids.push(rows[i].ID);
			}
			$.post("dragon/modules/system/org/action/OrgHandler/changeState.ejw", {
				ids : ids.join(","),
				state : 1
			}, function(data) {
				if (data == "t") {
					$('#mydatagrid').datagrid('reload');
					top.showMsg("", "启用成功！", false);
				} else {
					top.showErrorMsg("出错了", data);
				}
			});
			ids = null;
		} else {
			top.showMsg("", "请选择数据！", true);
		}
	}
</script>
</head>
<body>
${html}
</body>
</html>
</easyui:list>